Skip to content

Conversation

@newDINO
Copy link

@newDINO newDINO commented Nov 18, 2025

Objective

When using both deferred rendering and visibility range, shader pbr.wgsl can't be compiled because pbr_functions is not imported.

The issue can be reproduced by using DefaultOpaqueRendererMethod::deferred() and adding DeferredPrepass to camera at the visibility_range example.

Solution

Import pbr_functions when using PREPASS_PIPELINE.

Testing

I tested on visibility_range and deferred_rendering example. However, importing something usually doesn't break anything.

Copy link
Contributor

@NicoZweifel NicoZweifel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to reproduce the issue in both examples and the PR fixes both examples.

One import at the top instead of in both blocks (#ifdef and #else) would be nice though.

Copy link
Contributor

@NicoZweifel NicoZweifel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accidentally left some empty lines in the suggestions but looks good to go to me, thanks!

Co-authored-by: Nico Zweifel <[email protected]>
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen D-Straightforward Simple bug fixes and API improvements, docs, test and examples D-Shaders This code uses GPU shader languages labels Nov 18, 2025
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior D-Shaders This code uses GPU shader languages D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants